home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX" Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX" Object = "{DCAB1B27-C8E6-11D2-AC40-00C0DFE9A30F}#3.0#0"; "BWZIPVB5B4.OCX" Begin VB.Form Form1 Caption = "BW Zip Compress OCX 3.0.0 - Beta 4" ClientHeight = 6240 ClientLeft = 165 ClientTop = 450 ClientWidth = 9120 LinkTopic = "Form1" LockControls = -1 'True ScaleHeight = 6240 ScaleWidth = 9120 StartUpPosition = 2 'CenterScreen Begin BWZipCompress300.MaqZip MaqZip1 Left = 8040 Top = 720 _ExtentX = 1058 _ExtentY = 1058 End Begin VB.CommandButton Command10 Caption = "Get Status" Height = 495 Left = 6480 TabIndex = 39 Top = 1440 Width = 1455 End Begin VB.CommandButton Command9 Caption = "Cancel operation" Height = 375 Left = 3240 TabIndex = 38 ToolTipText = "This will cancel the compression or decompression" Top = 1800 Width = 2175 End Begin ComctlLib.ProgressBar ProgressBar1 Height = 135 Left = 120 TabIndex = 37 Top = 6000 Width = 8895 _ExtentX = 15690 _ExtentY = 238 _Version = 327682 Appearance = 1 End Begin ComctlLib.ListView ListView1 Height = 1455 Left = 120 TabIndex = 36 ToolTipText = "Click to select the file to uncompress" Top = 4440 Width = 8895 _ExtentX = 15690 _ExtentY = 2566 LabelWrap = -1 'True HideSelection = -1 'True _Version = 327682 ForeColor = -2147483640 BackColor = -2147483643 BorderStyle = 1 Appearance = 1 NumItems = 0 End Begin MSComDlg.CommonDialog CommonDialog1 Left = 3240 Top = 1200 _ExtentX = 847 _ExtentY = 847 _Version = 327681 End Begin VB.TextBox Text9 Height = 285 Left = 120 TabIndex = 32 Text = "*.*" Top = 2880 Width = 3015 End Begin VB.CommandButton Command8 Caption = "Get Zip file information" Height = 375 Left = 7200 TabIndex = 25 Top = 2640 Width = 1815 End Begin VB.CommandButton Command7 Caption = "Maximum" Height = 230 Left = 4800 TabIndex = 24 Top = 720 Width = 1455 End Begin VB.CommandButton Command6 Caption = "Normal" Height = 230 Left = 4800 TabIndex = 23 Top = 1200 Width = 1455 End Begin VB.CommandButton Command5 Caption = "Minimum" Height = 230 Left = 4800 TabIndex = 22 Top = 1440 Width = 1455 End Begin VB.CommandButton Command4 Caption = "High" Height = 230 Left = 4800 TabIndex = 21 Top = 960 Width = 1455 End Begin VB.CommandButton Command3 Caption = "Browse/List" Height = 375 Left = 3240 TabIndex = 18 Top = 2280 Width = 1215 End Begin VB.TextBox Text8 Height = 285 Left = 120 TabIndex = 17 Top = 840 Width = 3015 End Begin VB.TextBox Text7 Height = 285 Left = 120 TabIndex = 15 Text = "-o" Top = 3480 Width = 3015 End Begin VB.TextBox Text6 Height = 285 Left = 5520 TabIndex = 14 Top = 2280 Width = 2415 End Begin VB.TextBox Text5 Height = 285 Left = 120 TabIndex = 13 Top = 2280 Width = 3015 End Begin VB.TextBox Text4 Height = 285 Left = 120 TabIndex = 12 Top = 1440 Width = 3015 End Begin VB.TextBox Text3 Height = 285 Left = 6480 TabIndex = 7 Top = 240 Width = 2535 End Begin VB.TextBox Text2 Height = 285 Left = 3600 TabIndex = 3 Top = 240 Width = 2655 End Begin VB.TextBox Text1 Height = 285 Left = 120 TabIndex = 2 Top = 240 Width = 3015 End Begin VB.CommandButton Command2 Caption = "Decompress" Height = 375 Left = 5520 TabIndex = 1 Top = 2640 Width = 1575 End Begin VB.CommandButton Command1 Caption = "Compress" Height = 495 Left = 6480 TabIndex = 0 Top = 720 Width = 1455 End Begin VB.Label Label19 Height = 615 Left = 5280 TabIndex = 35 Top = 3480 Width = 3735 End Begin VB.Label Label18 Caption = "System error code returned :" Height = 255 Left = 3240 TabIndex = 34 Top = 3480 Width = 2055 End Begin VB.Label Label17 Height = 255 Left = 3360 TabIndex = 33 Top = 1200 Width = 1335 End Begin VB.Label Label16 Caption = "Select the Zip entries to uncompress" Height = 255 Left = 120 TabIndex = 31 Top = 2640 Width = 2895 End Begin VB.Label Label15 Caption = "This section will list the files in the Zip file" Height = 255 Left = 120 TabIndex = 30 Top = 3840 Width = 7815 End Begin VB.Label Label14 Caption = "Select the processor usage of the OCX" Height = 495 Left = 3240 TabIndex = 29 Top = 600 Width = 1455 End Begin VB.Label Label13 Height = 255 Left = 5520 TabIndex = 28 Top = 4080 Width = 2535 End Begin VB.Label Label12 Height = 255 Left = 2760 TabIndex = 27 Top = 4080 Width = 2655 End Begin VB.Label Label11 Height = 255 Left = 120 TabIndex = 26 Top = 4080 Width = 2415 End Begin VB.Label Label10 Height = 375 Left = 4800 TabIndex = 20 Top = 3120 Width = 4215 End Begin VB.Label Label9 Caption = "Error code returned : " Height = 255 Left = 3240 TabIndex = 19 Top = 3120 Width = 1455 End Begin VB.Label Label8 Caption = "Select the path of the files to compress" Height = 255 Left = 120 TabIndex = 16 Top = 0 Width = 2895 End Begin VB.Label Label7 Caption = "Select the destination file" Height = 255 Left = 6480 TabIndex = 11 Top = 0 Width = 2295 End Begin VB.Label Label6 Caption = "Select the options to decompress" Height = 255 Left = 120 TabIndex = 10 Top = 3240 Width = 3135 End Begin VB.Label Label5 Caption = "Select the path to the decompressed files" Height = 255 Left = 5520 TabIndex = 9 Top = 2040 Width = 3015 End Begin VB.Label Label4 Caption = "Select the file to decompress" Height = 255 Left = 120 TabIndex = 8 Top = 2040 Width = 3255 End Begin VB.Label Label3 Caption = "Select the options to compress" Height = 255 Left = 120 TabIndex = 6 Top = 1200 Width = 3135 End Begin VB.Label Label2 Caption = "Select the destination path" Height = 255 Left = 3600 TabIndex = 5 Top = 0 Width = 2295 End Begin VB.Label Label1 Caption = "Select the files to compress" Height = 255 Left = 120 TabIndex = 4 Top = 600 Width = 2535 End Begin VB.Menu compression Caption = "Compression Options" Begin VB.Menu fix Caption = "Fix damaged Zip file" End Begin VB.Menu fix2 Caption = "Force the fix of damaged Zip file" End Begin VB.Menu include Caption = "Include system and hidden files" End Begin VB.Menu option4 Caption = "Compress files with best compression" End Begin VB.Menu option5 Caption = "Compress files with fastest compression" End Begin VB.Menu option6 Caption = "Store files - dont compress" End Begin VB.Menu option2 Caption = "Delete files in Zip" End Begin VB.Menu option1 Caption = "Compress folders and subfolders" End End Begin VB.Menu decompression Caption = "Decompression Options" Begin VB.Menu option9 Caption = "Test Zip integrity - verify files in Zip" End Begin VB.Menu option8 Caption = "Decompress files and junk pathnames - and always overwrite" End Begin VB.Menu option7 Caption = "Decompress files and always overwrite if existing" End End Begin VB.Menu about Caption = "About" End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub about_Click() MaqZip1.AboutBox End Sub Private Sub Command1_Click() Form1.Caption = "Working..." Screen.MousePointer = vbArrowHourglass ric = MaqZip1.ZipCompress(Text1.Text, Text8.Text, Text2.Text, Text3.Text, Text4.Text) Screen.MousePointer = vbNormal End Sub Private Sub Command10_Click() MsgBox MaqZip1.Status End Sub Private Sub Command2_Click() Form1.Caption = "Working..." Screen.MousePointer = vbArrowHourglass MaqZip1.ZipUncompress Text5.Text, Text9.Text, Text6.Text, Text7.Text Screen.MousePointer = vbNormal End Sub Private Sub Command3_Click() CommonDialog1.ShowOpen If CommonDialog1.Filename = "" Then Exit Sub Text5.Text = CommonDialog1.Filename ListView1.ListItems.Clear Label11.Caption = "" Label12.Caption = "" Label13.Caption = "" If Dir(CommonDialog1.Filename) = "" Then Exit Sub 'verification of the file If MaqZip1.GetZipInfo(CommonDialog1.Filename) Then Label11.Caption = "Number of files : " & MaqZip1.NumberOfFiles Label12.Caption = "Total compressed size : " & MaqZip1.TotalCompressedSize Label13.Caption = "Total uncompressed size : " & MaqZip1.TotalUncompressedSize End If End Sub Private Sub Command4_Click() MaqZip1.CPUBoost = BWHigh Label17.Caption = "High" End Sub Private Sub Command5_Click() MaqZip1.CPUBoost = BWMinimum Label17.Caption = "Minimum" End Sub Private Sub Command6_Click() MaqZip1.CPUBoost = BWNormal Label17.Caption = "Normal " End Sub Private Sub Command7_Click() MaqZip1.CPUBoost = BWMaximum Label17.Caption = "Maximum" End Sub Private Sub Command8_Click() ListView1.ListItems.Clear Label11.Caption = "" Label12.Caption = "" Label13.Caption = "" CommonDialog1.ShowOpen If Dir(CommonDialog1.Filename) = "" Then Exit Sub 'verification of the file If MaqZip1.GetZipInfo(CommonDialog1.Filename) Then Label11.Caption = "Number of files : " & MaqZip1.NumberOfFiles Label12.Caption = "Total compressed size : " & MaqZip1.TotalCompressedSize Label13.Caption = "Total uncompressed size : " & MaqZip1.TotalUncompressedSize End If End Sub Private Sub Command9_Click() MaqZip1.CancelOperation End Sub Private Sub fix_Click() Text4.Text = "-F" End Sub Private Sub fix2_Click() Text4.Text = "-FF" End Sub Private Sub Form_Activate() Dim clmX As ColumnHeader Set clmX = ListView1.ColumnHeaders. _ Add(, , "Filename", ListView1.Width / 3) Set clmX = ListView1.ColumnHeaders. _ Add(, , "Date Time", ListView1.Width / 4) Set clmX = ListView1.ColumnHeaders. _ Add(, , "CRC-32", ListView1.Width / 10) Set clmX = ListView1.ColumnHeaders. _ Add(, , "Signature", ListView1.Width / 10) Set clmX = ListView1.ColumnHeaders. _ Add(, , "Version", ListView1.Width / 15) Set clmX = ListView1.ColumnHeaders. _ Add(, , "Compressed", ListView1.Width / 7) Set clmX = ListView1.ColumnHeaders. _ Add(, , "Uncompressed", ListView1.Width / 7) Set clmX = ListView1.ColumnHeaders. _ Add(, , "Ratio", ListView1.Width / 18) Set clmX = ListView1.ColumnHeaders. _ Add(, , "Compression Type", ListView1.Width / 5) ListView1.View = lvwReport End Sub Private Sub Form_Load() ProgressBar1.Min = 0 ProgressBar1.Max = 100 End Sub Private Sub include_Click() Text4.Text = "-S" End Sub Private Sub ListView1_ItemClick(ByVal Item As ComctlLib.ListItem) Text9.Text = Item End Sub Private Sub MaqZip1_CreatingDir() Form1.Caption = Form1.Caption & " Directory created" End Sub Private Sub MaqZip1_Errorcode(Errorcode As Long, Errordescription As String) Label10.Caption = Errordescription Form1.Caption = Finished End Sub Private Sub MaqZip1_Finished() Form1.Caption = "Finished" End Sub Private Sub MaqZip1_Progress(Position As Long) ProgressBar1.Value = Position End Sub Private Sub MaqZip1_SystemErrorCode(Errorcode As Long, Description As String) Label19.Caption = Errorcode & " : " & Description End Sub Private Sub MaqZip1_ZipFileInformation(Filename As String, ZipDay As Long, ZipMonth As Long, ZipYear As Long, ZipHour As Long, ZipMinute As Long, ZipSecond As Long, ZipCRC32 As String, ZipSignature As Long, ZipVersion As Long, ZipCompressedSize As Long, ZipUncompressedSize As Long, ZipRatio As Long, ZipCompressionType As Long) Set minhalista = ListView1.ListItems.Add(1, , Filename) ListView1.ListItems.Item(1).SubItems(1) = ZipDay & "/" & ZipMonth & "/" & ZipYear & " " & ZipHour & ":" & ZipMinute & ":" & ZipSecond 'this will format the values ListView1.ListItems.Item(1).SubItems(2) = ZipCRC32 ListView1.ListItems.Item(1).SubItems(3) = ZipSignature ListView1.ListItems.Item(1).SubItems(4) = ZipVersion ListView1.ListItems.Item(1).SubItems(5) = ZipCompressedSize ListView1.ListItems.Item(1).SubItems(6) = ZipUncompressedSize ListView1.ListItems.Item(1).SubItems(7) = ZipRatio & "%" 'this will add the percentage simbol to the value Select Case ZipCompressionType Case 1 ListView1.ListItems.Item(1).SubItems(8) = "None" Case 2 ListView1.ListItems.Item(1).SubItems(8) = "Super Fast" Case 3 ListView1.ListItems.Item(1).SubItems(8) = "Fast" Case 4 ListView1.ListItems.Item(1).SubItems(8) = "Normal" Case 5 ListView1.ListItems.Item(1).SubItems(8) = "Maximum" End Select End Sub Private Sub option1_Click() Text4.Text = "-R" End Sub Private Sub option2_Click() Text4.Text = "-d" MsgBox "Select what files in the Zip you want to delete , and you can use wildcards like this -> *.txt *.exe *.* " Text8.Text = "*.*" End Sub Private Sub option4_Click() Text4.Text = "-9" End Sub Private Sub option5_Click() Text4.Text = "-1" End Sub Private Sub option6_Click() Text4.Text = "-0" End Sub Private Sub option7_Click() Text7.Text = "-o" End Sub Private Sub option8_Click() Text7.Text = "-o -j" End Sub Private Sub option9_Click() Text7.Text = "-t" MsgBox "The option to be inserted in decompression is '-t' " & vbCrLf & _ "The errorcode will return the state of the Zip file , if it returns 0 or 1 , then the Zip file is ok , any different value will represent a bad Zip file , and you need to select what entry in Zip you want to test , insert an '*.*' to test all entries and the entire Zip file also or '*.txt' to test any txt file in the Zip , and the possibility of errors in this detection is very low , in our tests a unique single byte different in any place of the file can be detected by this verification despite the possibility to the file be decompressed by the Infozip or Winzip method without errors , to make the test we are using the normal Zip error detection and a new method of Zip error detection developed originally by BinaryWork Corp." End Sub